package com.enjoyor.soa.traffic.core.tpcms.mapper.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.enjoyor.soa.traffic.core.tpcms.constant.RltApplyZoneSqlId;
import com.enjoyor.soa.traffic.core.tpcms.domain.RltApplyZone;
import com.enjoyor.soa.traffic.core.tpcms.mapper.IRltApplyZoneMapper;
import com.enjoyor.soa.traffic.frame.support.mybatis.mapper.impl.BaseMapper;

@Service
@Transactional
public class RltApplyZoneMapper extends BaseMapper<RltApplyZone> implements IRltApplyZoneMapper {

    /*
     * @Override public void insert(RltApplyZone rltApplyZone) {
     * rltApplyZone.setRltId(String.valueOf(System.nanoTime()));
     * super.insert(rltApplyZone); }
     */

    @Override
    public List<RltApplyZone> getRltApplyZoneList(Map<String, Object> map) {
        return sqlSessionTemplate.selectList(getSqlName(RltApplyZoneSqlId.SQL_SELECT_LIST), map);
    }

    @Override
    public int deleteRltByApplyId(String passApplyId) {
        return sqlSessionTemplate.delete(getSqlName(RltApplyZoneSqlId.SQL_DELETE_APPLY), passApplyId);
    }

    @Override
    public int deleteRltByCheckId(String checkId) {
        return sqlSessionTemplate.delete(getSqlName(RltApplyZoneSqlId.SQL_DELETE_CHECK), checkId);
    }
    
}
